{

  //先输出1,2,3
  //然后在遍历输出
  function print() {
    var name = 'zhangsan';
    var skills = ['js', 'vue', 'angular'];
    for (let i = 0, len = skills.length; i < len;) {
      setTimeout(function() {
        console.log(name + ' learn skill ' + i + ' ' + skills);
        console.log('.................');
      }, 0)
      console.log(++i)
    }
  }
  // print();
}

{
  /**
   * [Aniaml 实现函数的bind方法，使程序结果能打印出来success]
   * @param       {[type]} name  [description]
   * @param       {[type]} color [description]
   * @constructor
   */
  function Animal(name, color) {
    this.name = name;
    this.color = color;
  }
  Animal.prototype.say = function() {
    console.log(`I'm ${this.name}, my color is ${this.color}`);
  }
  var Cat = Animal.bind(null, 'cat');
  var cat = new Cat('white');
  var res = cat.say();
  if (res && cat instanceof Cat && cat instanceof Animal) {
    console.log('success');
  }

  console.log(res instanceof Cat);//false
  console.log(cat instanceof Cat);//true
  console.log(cat instanceof Animal);//true

//暂时不会 -.-

}

{
  let arr=['1','2','3'].map(parseInt);
  console.log(arr);//[1,NaN,NaN]

}
